import maya.cmds as cmds

def hierarchyA():
    #group ( 'Object to Group, or Empty Group (em), Group Name, Group's Parent (if any) )
    cmds.group( em=True, n='char_node01' )
    cmds.group( em=True, n='mesh01', p='char_node01' )
    cmds.group( em=True, n='globalMove01', p='char_node01' )
    cmds.group( em=True, n='extraNodes01', p='char_node01' )
    cmds.group( em=True, n='bindJoints01', p='globalMove01' )
    cmds.group( em=True, n='rigJoints01', p='globalMove01' )
    cmds.group( em=True, n='constraints01', p='globalMove01' )
    cmds.group( em=True, n='anim_controls01', p='globalMove01' )
    cmds.group( em=True, n='extra_Visible01', p='extraNodes01' )
    cmds.group( em=True, n='extra_Hidden01', p='extraNodes01' )
    cmds.select( clear=True )

def hierarchyB():
    cmds.group( em=True, n='_grp01' )
    cmds.group( em=True, n='global_scale01', p='_grp01' )
    cmds.group( em=True, n='anim_controls01', p='_grp01' )
    cmds.group( em=True, n='DO_NOT_TOUCH01', p='global_scale01' )
    cmds.group( em=True, n='mesh01', p='DO_NOT_TOUCH01' )
    cmds.group( em=True, n='deform01', p='DO_NOT_TOUCH01' )
    cmds.group( em=True, n='control01', p='DO_NOT_TOUCH01' )
    cmds.select( clear=True )

'''
Shelf Button:

import ap_RigHierarchySetup as apRHS()
apRHS.hierarchyA

Switch "A" to "B" for the other option
'''
